import { App, Plugin, PluginSettingTab, Setting } from 'obsidian';
import { insertTodaysDate, insertTodaysTime, convertToUppercase, convertToLowercase, insertFontBlock, convertToInlineCode } from './plugins';
import { SampleSettingTab } from "./SampleSettingTab"
import { uploadImage } from './uploader';


// Remember to rename these classes and interfaces!

interface ToolboxSettings {
	uploader: string;
}

const DEFAULT_SETTINGS: ToolboxSettings = {
	uploader: 'uploader.exe'
}

export default class Toolbox extends Plugin {
	settings: ToolboxSettings;

	async onload() {
		await this.loadSettings();

		insertTodaysDate(this)
		insertTodaysTime(this)
		convertToUppercase(this)
		convertToLowercase(this)
		insertFontBlock(this)
		convertToInlineCode(this)

		uploadImage(this)


		this.addSettingTab(new SampleSettingTab(this.app, this));
	}

	onunload() {

	}

	async loadSettings() {
		this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
	}

	async saveSettings() {
		await this.saveData(this.settings);
	}
}


